###### Replication Package for Ballesteros, S., Balcells, L., & Solomon, D. (2025): Formal institutions after conflict: Rebel ideology and postwar constitutional design ###################



This document describes all datasets and procedures required to replicate the analyses presented in the main paper and the appendix. It also includes a list of final tables and figures included in both documents.


Note: All figures included in this package are identical to those published in the article and appendix. They were generated using the do-file listed below. While the do-file performs all regressions and calculates the descriptive statistics reported in the main text and appendix, it does not automatically generate the final .tex files included in this package. However, the do-file contains instructions for creating these .tex files. The final .tex files themselves are also included in this package.


****************
*** Datasets ***
****************

1- reb_ideol_const_design_data.dta
2- ccp_ordered.dta

"reb_ideol_const_design_data": The main dataset used in the paper. It includes data on the ideology of the rebel group, war outcomes, GDP per capita, population, religious and ethnic fractionalization, the Liberal Democracy index, and external support for government and rebels across 153 civil wars (from Balcells and Kalyvas, 2025). Data on Maoist rebel groups comes from Balcells, Chen and Pischedda (2022). Data on new constitutions, amendments and constitutional contents comes from the Comparative Constitutions Project Data V.4.0 (Elkins and Ginsburg, 2022).

"ccp_ordered": Comparative Constitutions Project Data V.4.0 (Elkins and Ginsburg, 2022), sorted by COW code and year.



****************
*** Dictionary of Variables ***
****************

-"Dictionary of variables.txt": includes details on all the variables in the "reb_ideol_const_design_data" dataset used in the analysis. The codebook of the Comparative Constitutions Project V4 dataset is available at: https://comparativeconstitutionsproject.org/download-data/



****************
*** Do Files ***
****************

-"Replication Results.do": do-file to replicate all tables and figures in the paper and appendix. Note that Figures A2 and A3 are at the end of the Appendix. Required packages for Stata are listed below and in the do-file. It uses the "reb_ideol_const_design_data" and the "ccp_ordered" datasets. The do-file includes 3 sections:

1. Line 1: Replications Main Article
2. Line 363: Appendix
3. Line 1773: Figures A2 and A3    


Note: Line numbers refer to the version as of June 2025; if the do-file is edited, please search for code chunks by their section headers.



********************************
*** Replication Instructions ***
********************************

1. Place all datasets and do-files into a single folder.

2. Ensure you have Stata (version 17 or 18) installed, as well as the required Stata packages listed below.

3. Open "Replication Results.do" in Stata.

4. Replace the directory path after the 'cd' command on lines 24, 366 and 1793 with your working folder path.

5. Run "Replication Results.do" to replicate the results presented in all figures and tables in the paper and appendix. Run the do-file from the beginning without skipping sections, to ensure all required functions are defined.

6. See the instructions in the do file for exporting each table in the final .tex format used in the paper and appendix.  

Note: In lines 161 and 1479 we created a function called "appendmodels". The code used in both lines is the same, so line 1471 will not work if you do not run the first part of the appendix section (from lines 366 to 388) before.  

Note: Always run the do-file sequentially from the beginning; do not run lines from the appendix in isolation, as required functions are initialized earlier in the script.


**************************************************
*** Tables and Figures included in the Replication package ***
**************************************************

The Output subfolder includes all tables (.tex) and figures (.eps) created by running "Replication Results.do":

Main Paper: 
- Table 1: Table1.tex
- Table 2: Table2.tex
- Figure 1: Figure1.eps
- Figure 2: Figure2.eps
- Figure 3: Figure3.eps
- Table 3: Table3.tex

Appendix:
- Figure A1: FigureA1.jpg
- Figure A2: FigureA2.jpg
- Figure A3: FigureA3.jpg
- Table A1: TableA1.tex
- Table A2: TableA2.tex
- Table A3: TableA3.tex
- Table A4: TableA4.tex
- Table A5: TableA5.tex
- Table A6: TableA6.tex
- Table A7: TableA7.tex
- Figure A4: FigureA4.eps
- Table A8: TableA8.tex
- Figure A5: FigureA5.eps
- Figure A6: FigureA6.eps
- Figure A7: FigureA7.eps
- Figure A8: FigureA8.eps
- Figure A9: FigureA9.eps
- Figure A10: FigureA10.eps
- Figure A11: FigureA11.eps
- Figure A12: FigureA12.eps
- Figure A13: FigureA13.eps
- Table A9: TableA9.tex
- Table A10: TableA10.tex



*****************************
*** Software Dependencies ***
*****************************

The analyses were replicated in Stata 17 on Windows 11, and in Stata 18 on MacOS (Sonoma 14.7.5). The following have to be downloaded on Stata:

- Modern Scheme: net install scheme-modern, from("https://raw.githubusercontent.com/mdroste/stata-scheme-modern/master/")

- Addplot: ssc install addplot

- Coefplot: ssc install coefplot

- Firthlogit: ssc install firthlogit

- Xlincom: ssc install xlincom
 


******************
*** References ***
******************

Balcells, L., Chen, C., & Pischedda, C. (2022). Do Birds of a Feather Flock Together? Rebel Constituencies and Civil War Alliances. International Studies Quarterly 66 (1): 1–15

Balcells, L., & Kalyvas, S. (2025). Ideology and Revolution in Civil Wars: The ‘Marxist Paradox’. American Political Science Review, FirstView, doi: 10.1017/S0003055425000188

Elkins, Z., & Ginsburg, T. (2022). Characteristics of National Constitutions, Version 4.0. Comparative Constitutions Project. https://www.comparativeconstitutionsproject.org. 



******************
*** Contact ***
******************
For questions or queries about the Replication files, contact Dr. Simón Ballesteros (sb1795@georgetown.edu) or Dr. Laia Balcells (laia.balcells@georgetown.edu).
